1. Field of the Invention
The present invention relates to a data rewriting technique, and particularly relates to data rewriting control when a write fault occurs.
2. Description of the Related Art
In a conventional magnetic disk apparatus, if a write fault occurs while data is being written, data is rewritten in a predetermined number of sectors located before the sector where the write fault has occurred. A conventional technology has been disclosed, for example, in Japanese Patent Application Laid-open No. H5-207789.
The reason for rewriting the data in the sectors located before the sector where the write fault occurs is as follows. Due to intermittent nature of servo sampling for detecting an offtrack position, if a write fault occurs due to the offtrack position or the like, it is probable that data in sectors between a previous servo frame (where it is assumed that data is written at a normal track position) of a servo frame where the offtrack position is detected and a servo frame where the offtrack position is detected is written off track. Therefore, it is necessary to rewrite the data in the sectors between the two servo frames to a center of a track. Thus, the number of sectors in which data is to be rewritten should include the sector including the servo frame where the write fault is detected.
Generally, a magnetic disk is divided into zones from an outer periphery to an inner periphery to increase a recording density of the magnetic disk. The number of sectors varies in every track from the outermost track to the innermost track in a zone. However, the number of servo frames of all the tracks in a zone is the same to keep the servo sampling constant.
More sectors are present between any two servo frames towards the outer periphery, and smaller sectors are present between any two servo frames towards the inner periphery. However, the maximum number of sectors between two frames in the outermost track is generally set as a fixed value for the number of sectors in which the data is to be rewritten.
However, in the conventional technology, the rewrite sector count is determined based on a variation in the head in a radial direction, that is, an offtrack amount without taking into account a variation in a levitation amount of the head, that is, a movement of the head in a vertical direction. Consequently, the writing process is completed with unstably written data recorded on the magnetic disk.
Thus, the rewrite sector count possibly only covers those areas where the variation in the head movement takes place in the radial direction and not those areas where the variation in the head movement takes place in the vertical direction. As a result, if a reading process for reading the data thus written is to be performed in the future, the reading process can become unstable.
In other words, it is imperative to rewrite data in sectors with unstably written data by taking into account the levitation amount of the head in addition the offtrack amount. Particularly, the magnetic disk apparatus installed in a portable apparatus (such as a portable data tool or a portable music player) likely to be carried on a train, plane or when walking, or during hiking, etc, is constantly at risk of being subjected to continuous jolts. The magnetic disk apparatus is easily affected by the usage environment of the portable device. It is, therefore, essential to ensure successful rewriting of data in the magnetic disk apparatus.